package com.example.demo.dao;

import com.example.demo.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {
    int deleteByPrimaryKey(Integer userid);

    //新增用户
    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userid);

    //修改用户信息
    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //通过用户手机号查询
    @Select("SELECT * FROM user WHERE PhoneNumber=#{phonenumber}")
    List<User> selectByphonenumber(String phonenumber);

}